package org.type4neo;

import org.neo4j.graphdb.Relationship;
import org.type4neo.imp.TypedPropertyContainer;

/**
 * Base interface for all strongly typed relationship interfaces.
 * 
 * @author pragone
 *
 */
public interface TypedRelationship extends Relationship, TypedPropertyContainer {

	/**
	 * Gets the original Neo4J {@link Relationship} that this object wraps
	 * 
	 * @return The original Neo4J Relationship that this object wraps
	 */
	public Relationship getUnderlyingRelationship();

	/**
	 * Changes the type associated with this Relationship.
	 * 
	 * @param newType The new type to associate with this Relationship
	 * @return The new strongly typed wrapper around this Relationship that behaves like the <code>newType</code> 
	 */
	public Relationship mutateTo(Class<? extends TypedRelationship> newType);

}